package com.mysen.sso.dao;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.mysen.sso.dao.mapper.PermissionMapper;
import com.mysen.sso.model.Permission;

@Repository
public class PermissionDao {
	
	@Autowired
	private PermissionMapper mapper;

    public List<Permission> selectByPage(Permission record){
        return mapper.selectByPage(record);
    }
    
    public Integer selectByPaeCount(Permission record){
    	return mapper.selectCount(record);
    }

    public int deleteById(String id){
        return mapper.deleteById(id);
    }

    public int insert(Permission record){
        return mapper.insert(record);
    }

    public Permission selectById(String id){
        return mapper.selectById(id);
    }

    public int updateById(Permission record){
        return mapper.updateById(record);
    }

	public List<Permission> selectTree(String pid) {
		return mapper.selectTree(pid);
	}

}
